home *** CD-ROM | disk | FTP | other *** search
/ Computer Arts 148 / ART_148.iso / Zasoby / Szablony Flasha / flashmo_241_multi_scroller / transitions.swf / scripts / DescriptionMessage.as < prev    next >
Encoding:
Text File  |  2007-09-13  |  1022 b   |  43 lines

  1. package
  2. {
  3.    import flash.display.*;
  4.    import flash.events.*;
  5.    import flash.text.TextField;
  6.    
  7.    [Embed(source="/_assets/assets.swf", symbol="symbol33")]
  8.    public class DescriptionMessage extends MovieClip
  9.    {
  10.       public var background:MovieClip;
  11.       
  12.       private var _height:Number;
  13.       
  14.       public var textDescription:TextField;
  15.       
  16.       private var _width:Number;
  17.       
  18.       public function DescriptionMessage()
  19.       {
  20.          super();
  21.          _width = 120;
  22.          _height = 97;
  23.          background.visible = false;
  24.       }
  25.       
  26.       public function redraw() : void
  27.       {
  28.          background.width = _width;
  29.          background.height = _height;
  30.          textDescription.width = _width;
  31.          textDescription.y = _height / 2 - textDescription.textHeight / 2 + 4;
  32.       }
  33.       
  34.       public function setSize(param1:Number, param2:Number) : void
  35.       {
  36.          _width = param1;
  37.          _height = param2;
  38.          redraw();
  39.       }
  40.    }
  41. }
  42.  
  43.